load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "sig_util",
    srcs = ["SigUtil.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:ecdsa_java_proto",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:enums",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "sig_util-android",
    srcs = ["SigUtil.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:ecdsa_java_proto_lite",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves-android",
        "//src/main/java/com/google/crypto/tink/subtle:enums-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "ecdsa_proto_serialization-android",
    srcs = ["EcdsaProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:ecdsa_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_parameters-android",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_private_key-android",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_public_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "ecdsa_proto_serialization",
    srcs = ["EcdsaProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:ecdsa_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_parameters",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_public_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "legacy_full_sign",
    srcs = ["LegacyFullSign.java"],
    deps = [
        ":legacy_full_verify",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "legacy_full_verify",
    srcs = ["LegacyFullVerify.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "rsa_ssa_pss_proto_serialization",
    srcs = ["RsaSsaPssProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:rsa_ssa_pss_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_public_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "legacy_full_sign-android",
    srcs = ["LegacyFullSign.java"],
    deps = [
        ":legacy_full_verify-android",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink:public_key_sign-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "legacy_full_verify-android",
    srcs = ["LegacyFullVerify.java"],
    deps = [
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink:public_key_verify-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key-android",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "rsa_ssa_pkcs1_proto_serialization",
    srcs = ["RsaSsaPkcs1ProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:rsa_ssa_pkcs1_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_public_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "rsa_ssa_pkcs1_proto_serialization-android",
    srcs = ["RsaSsaPkcs1ProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:rsa_ssa_pkcs1_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding-android",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_parameters-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_private_key-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_public_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "rsa_ssa_pss_proto_serialization-android",
    srcs = ["RsaSsaPssProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:rsa_ssa_pss_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding-android",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_parameters-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_private_key-android",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_public_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "ed25519_proto_serialization-android",
    srcs = ["Ed25519ProtoSerialization.java"],
    deps = [
        "//proto:ed25519_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_parameters-android",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_private_key-android",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_public_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "ed25519_proto_serialization",
    srcs = ["Ed25519ProtoSerialization.java"],
    deps = [
        "//proto:ed25519_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_parameters",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_public_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)
